def getIP():
    import socket, re
    hostname = socket.gethostname()
    myaddr = socket.getaddrinfo(hostname, None)
    j = 0
    print(myaddr)
    # for i in myaddr[2][0]:
    for i in range(len(myaddr)):
        for j in range(len(myaddr[i])):
            print(str(i) + ":" + str(j) + "=" + str(myaddr[i][j]))
            if str(myaddr[i][j]) == 'AddressFamily.AF_INET':
                ip = str(myaddr[i][4])



